package com.eshop.we.controller;

import com.eshop.we.business.UserBusiness;
import com.eshop.we.user.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author wangzhanguo
 * @create 2018-06-05 10:54
 **/
@RestController
@RequestMapping("/home")
public class HomeController extends  BaseController{
    @Autowired
    private UserBusiness userBusiness;

    @RequestMapping("/list")
    public Map<String,Object> list(){
        return new HashMap<String,Object>(){{
            User u = new User();
            put("name",userBusiness.selectById(1));
        }};
    }

}
